<?$sess = new Zend_Session_Namespace(CLU_NS);?>
<script type="text/javascript">

$(function(){

	$('.chooseOtherCategory').openDOMWindow({ 
	    height:250, 
	    width:510, 
	    positionType:'centered', 
	    positionTop:100, 
	    eventType:'click', 
	    positionLeft:100, 
	    windowSourceID:'#chooseCategory', 
	    windowPadding:10, 
	    /*draggable:1,*/ 
	    windowBGColor:'#FFFFFF', 
	    borderColor:'#24386c',
	    borderSize: '12', 
	    overlayOpacity:40 
	});	
});
</script>
<div class="box" style="background: #ffffff;">
<div class="">
  <div class="box_info2">
	    <div class="box_info2_bar">
	      <div class="menu_title2">
	        <ul>
	          <li class="current"><a href="<?=$this->hvnUrl(array('type' => 'blog', 'action' => 'search'), 'node')?>?cluSearch=1&searchAll=1"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?=t(98) ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></a></li>
	          <li><a href="<?=$this->hvnUrl(array('type' => 'blog', 'action' => 'search'), 'node')?>?cluSearch=1&searchAll=1&order_by=created&asc_or_desc=DESC"><b><?=t(3003) ?></b></a></li>
	          <li><a href="<?=$this->hvnUrl(array('type' => 'blog', 'action' => 'search'), 'node')?>?cluSearch=1&searchAll=1&order_by=views&asc_or_desc=DESC"><b><?=t(3004) ?></b></a></li>
	        </ul>
	     </div>
	    </div>
	    <?$i = 0;?>
		<?foreach ($this->viewParams['items'] as $blog) :?>
            <div class="list_news border_news">
                <div class="news_title"><a href="<?=$this->hvnUrl(array('type' => 'blog', 'action' => 'view'), 'node')?>?&id=<?=$blog['id']?>"><?=$blog['title']?></a></div>
                <div class="clear"></div>
                <div class="news_img">
                <? if ($blog['thumb'])
                		$imageUrl = str_replace("/original/", "/medium/", $blog['thumb']);
                	else
                		$imageUrl = "/public/themes/hard/images/img-news.jpg";
                ?>
                <img src="<?=$imageUrl?>" align="absmiddle" /> </div>
                <div class="text"><?=str_first_words(strip_tags($blog['body']), 55)?></div>
                <div class="detail"><a href="<?=$this->hvnUrl(array('type' => 'blog', 'action' => 'view'), 'node')?>?id=<?=$blog['id']?>"><?=t(150) ?>...</a></div>
            </div>
            
			<script type="text/javascript">
				var oriLang = '<?= get_language_from_int($blog['language'])?>';
				var lang = '<?= $sess->viewLang?>';
				googleTranslate(oriLang, lang, 'news_title', 'text');
			</script>
            <?$i++;?>
            <?if($i == 3) :?><?break;?><?endif?>
		<?endforeach?>
  </div>
	<div class="box_category">
		<div class="box_category_bar"><?=t(14) ?></div>
			<?$i = 0;?>
			<?foreach ($this->viewParams['listCategory'] as $cate) :?>
				<?$metadata = unserialize($cate['metadata']);?>
			     <div class="box_category_title"><a href="<?=$this->hvnUrl(array('module' => 'place', 'action' => 'search'), 'nocontroller')?>?cluSearch=1&rtype=<?=$cate['id']?>"><?=p($cate['title'])?> </a>(<?=$metadata['total']?>)
			     </div>
			     <div class="clear"></div>
			     <?$i++?>
			     <?if($i == 14) :?><?break;?><?endif?>
			<?endforeach?>
			 <div class="detail">
			 	<a href="#chooseCategory" class="chooseOtherCategory" ><?=t(150) ?>...</a>
			 	
			 	
			 	
			 	<div id="chooseCategory" style="display: none;">
                <div class="clear"></div>
                 <div class="chitiet_bar_ajax" style="width: 100%">&nbsp;&nbsp;<?=t(14)?></div>
          <br /><br /><br />
          
          <?foreach ($this->viewParams['listCategory'] as $category) :?>
                	<?$metadata = unserialize($category['metadata']);?>
                     <div class="sukien_box_right_item">
								<a href="<?=$this->hvnUrl(array('module'=>'place','action' => 'search'), 'nocontroller')
										?>?cluSearch=1&rtype=<?=$category['id']?>"><?=p($category['title'])?>(<?=$metadata['total']?>)</a>
                     </div>
					<?endforeach?>
                </div> 
             </div>
			 <div class="clear"></div>
	    </div>
	</div>
</div>